import request from '@/utils/request'

export function createMistake(data) {
  return request({
    url: '/mistake/create',
    method: 'POST',
    data
  })
}

export function getMistakes(params) {
  return request({
    url: '/mistakes',
    method: 'GET',
    params
  })
}

export function getMistake(id) {
  return request({
    url: `/mistake/${id}`,
    method: 'GET'
  })
}

export function updateMistake(data) {
  return request({
    url: `/mistake/update`,
    method: 'PUT',
    data
  })
}

export function deleteMistake(id) {
  return request({
    url: `/mistake/${id}`,
    method: 'DELETE'
  })
}
